@(messages: List[Message], count: Int)(implicit request: RequestHeader)
@import helper._
@main("欢迎来到社区！") {
<div class="main fly-user-main layui-clear">
  @sidebar("message")

  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>

  <div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user" id="LAY_msg" style="margin-top: 15px;">
      <button class="layui-btn layui-btn-danger" id="LAY_delallmsg" data-token="">清空全部消息</button>
      <div  id="LAY_minemsg" style="margin-top: 10px;">
        @if(messages.isEmpty){
        <div class="fly-none">您暂时没有最新消息</div>
        }
        <ul class="mine-msg">
          @for(m <- messages){
          <li data-id="@m._id" data-token="">
            <blockquote class="layui-elem-quote">
              @if(m.action == "reply"){
              <a href="/user/home?uid=@{m.actor._id}" target="_blank"><cite>@{m.actor.name}</cite></a>回复了您的@utils.AppUtil.prettyResource(m.source)<a target="_blank" href="/@{m.source}/view?_id=@{m.sourceId}"><cite>@{m.sourceTitle}</cite></a>
              }
              @if(m.action == "at"){
              <a href="/user/home?uid=@{m.actor._id}" target="_blank"><cite>@{m.actor.name}</cite></a>在@utils.AppUtil.prettyResource(m.source)<a target="_blank" href="/@{m.source}/view?_id=@{m.sourceId}"><cite>@{m.sourceTitle}</cite></a>的回复中提到了您。
              }
              @if(m.action == "accept"){
              <a href="/user/home?uid=@{m.actor._id}" target="_blank"><cite>@{m.actor.name}</cite></a>在@utils.AppUtil.prettyResource(m.source)<a target="_blank" href="/@{m.source}/view?_id=@{m.sourceId}"><cite>@{m.sourceTitle}</cite></a>采纳了您的回复。
              }
            </blockquote>
            <p><span>@utils.DateTimeUtil.toPrettyString(m.createTime)</span><a href="javascript:;" class="layui-btn layui-btn-small layui-btn-danger fly-delete">删除</a></p>
          </li>
          }
        </ul>
      </div>
    </div>
  </div>

</div>
}

<script>
layui.cache.page = 'user';
</script>
